package com.ssii.www.myproject.domain;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@ToString
@Table(name="t_task")
@Entity
@Data
public class Task extends BaseDomain {

  @Setter
  @Getter
  //系统标识
  private Long sid  ;

  @Setter
  @Getter
  //任务当前状态
  private Long state ;

  @Setter
  @Getter
  //申请的系统名称
  private String name;

  @Getter
  @Setter
  //申请系统版本
  private String version;

  @Getter
  @Setter
  //申请人
  private String applicant;

  @Getter
  @Setter
  //申请原因
  private String applyrea;

  @Getter
  @Setter
  //申请码
  private String applycode;


  //任务当前状态
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date applydate ;

  //申请时间
  //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  public Date getApplydate() {
    return applydate;
  }

  public void setApplydate(Date applydate) {
    this.applydate = applydate;
  }

  @Getter
  @Setter
  //任务办理人
  private String assignee;

  @Getter
  @Setter
  //授权行政
  private String administration;


  //授权截至日期
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date deadline;

  //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  public Date getDeadline() {
    return deadline;
  }

  public void setDeadline(Date deadline) {
    this.deadline = deadline;
  }

  @Getter
  @Setter
  //授权码
  private String license;
  @Getter
  @Setter
  private String denyrea;
}
